
#include "Fire.h"
#include "Bonus.h"
#include "Bomb.h"
#include "Position.h"
#include "Labyrinth.h"
#include "Constant.h"

#include <cstdlib>
#include <iostream>
#include <string>
#include <fstream>
#include <time.h>

using namespace std;

Fire::Fire(Position _position, float& _initTime, Labyrinth _labyrinth)
: firePosition(_position), initTime(_initTime), labyrinth(_labyrinth)
{
	//cout << "fire position:" << endl;
	//firePosition.display();
	labyrinth.setElement(firePosition, FIRE);
}

void Fire::getFire(Labyrinth& _labyrinth)
{
	_labyrinth = labyrinth;
}



void Fire::refreshFire(float& elapsedTime, Labyrinth& labyrinth)
{
	float limitTime = initTime + 1;
	if (elapsedTime > limitTime)
	{
		labyrinth.setElement(firePosition, GROUND);
	}
}
